ss = [11, 21, -13, 15, -28]
print(ss)
print(sorted(ss))
print(sorted(ss, key=lambda x: abs(x), reverse=True))

ss = [("Jack", 99), ("Sam", 98), ("Lucy", 88)]
print(sorted(ss, key=lambda x: x[0]))
print(sorted(ss, key=lambda x: x[1], reverse=True))


def log(fn):
    def wrapper(*args, **kw):
        print("call %s()" % fn.__name__)
        return fn(*args, **kw)

    return wrapper


@log
def hello():
    print("hello world")

hello()